Peter Bloomfield [Tue, 6 Mar 2018 19:26:08 +0000 (14:26 -0500)]
expander: Check for an existing child when adding
Now that GtkExpander subclasses GtkContainer instead of GtkBin, it needs
its own guard against adding more than one child.
Also, the documentation should no longer describe adding a child as if
it is descended from GtkBin.
Timm Bäder [Tue, 6 Mar 2018 16:36:04 +0000 (17:36 +0100)]
expander: fix sizes in resize_toplevel
We can't use gtk_widget_get_allocation for either non-anchored widgets
(which happens with the child widget when the expander is unexpanded)
nor toplevel windows since that will include the window decorations.
Fixes #70 in gtk4
Timm Bäder [Tue, 6 Mar 2018 13:37:28 +0000 (14:37 +0100)]
viewport: Remove priv pointer
Timm Bäder [Mon, 5 Mar 2018 16:22:20 +0000 (17:22 +0100)]
expander: Attach the gesture to the title widget
Instead of tracking whether the click happened inside the title widget
ourselves, just attach the gesture to the title widget.
Rūdolfs Mazurs [Sun, 4 Mar 2018 19:24:16 +0000 (19:24 +0000)]
Update Latvian translation
Rūdolfs Mazurs [Sun, 4 Mar 2018 19:18:11 +0000 (19:18 +0000)]
Update Latvian translation
Timm Bäder [Sun, 4 Mar 2018 19:04:43 +0000 (20:04 +0100)]
overlay: Make forall() remove-safe
Since this is a GtkContainer, forall will be used to destroy all the
widgets.
Timm Bäder [Sun, 4 Mar 2018 19:04:17 +0000 (20:04 +0100)]
overlay: Fix GSlide/g_free mixup
We free the allocated data later using g_free, so don't use GSlice when
allocating it.
Timm Bäder [Sun, 4 Mar 2018 19:03:54 +0000 (20:03 +0100)]
overlay: Fix remove implementation
Use the child widget list of the overlay, not the passed child.
Timm Bäder [Sun, 4 Mar 2018 18:55:54 +0000 (19:55 +0100)]
imcontextxim: Move initialisation into _init function
We are creating these using g_object_new, so the _new function is never
called, resulting in a NULL mb_charset. Fix this by moving the
initialisation into the _init function.
Benjamin Otte [Sun, 4 Mar 2018 18:29:45 +0000 (18:29 +0000)]
Merge branch 'set-client-widget-nullable' into 'master'
gtkimcontextxim: fix gtk_im_context_xim_set_client_widget not handling widget=NULL
See merge request GNOME/gtk!46
Timm Bäder [Sun, 4 Mar 2018 16:48:36 +0000 (17:48 +0100)]
gskpango: Don't create text nodes for clipped text
Measure the text here directly and check if the created node bounds will
be clipped away before even creating the text node.
Timm Bäder [Sun, 4 Mar 2018 16:35:17 +0000 (17:35 +0100)]
rendernodes: Add gsk_text_node_new_with_bounds
An alternative GskTextNode constructor that does no text measuring. That
way, we can measure the text before and check if the node will be
outside of the current clip anyway.
Timm Bäder [Sun, 4 Mar 2018 16:25:49 +0000 (17:25 +0100)]
rendernodes: Add missing nullable annotation
Timm Bäder [Sun, 4 Mar 2018 16:15:39 +0000 (17:15 +0100)]
gl renderer: Limit texture node size to clip
Timm Bäder [Sat, 3 Mar 2018 11:28:05 +0000 (12:28 +0100)]
overlay: Remove child list
Timm Bäder [Sat, 3 Mar 2018 10:28:57 +0000 (11:28 +0100)]
overlay: Remove priv pointer
Timm Bäder [Fri, 2 Mar 2018 16:22:46 +0000 (17:22 +0100)]
glglyphcache: Pass lookup key to g_hash_table_lookup directly
Timm Bäder [Thu, 1 Mar 2018 20:47:36 +0000 (21:47 +0100)]
overlay: Fix coordinates in child_update_style_classes
Both main child and all others are in the same coordinate space, so no
need to add the parent position here.
Timm Bäder [Thu, 1 Mar 2018 20:36:15 +0000 (21:36 +0100)]
overlay: Don't chain up in size_allocate
The GtkBin size_allocate implementation will allocate a size to the main
child, which GtkOverlay already does.
Timm Bäder [Thu, 1 Mar 2018 17:42:59 +0000 (18:42 +0100)]
entry: Remove priv pointer
Timm Bäder [Thu, 1 Mar 2018 09:35:44 +0000 (10:35 +0100)]
container: Remove unused struct member
Timm Bäder [Wed, 28 Feb 2018 15:03:35 +0000 (16:03 +0100)]
testsuite: Remove GL text test case
This was just testing that text nodes do alpha correctly, but the test
even breaks if the default font is different from the one that was used
to create the reference image, so drop it for now.
Timm Bäder [Wed, 28 Feb 2018 14:27:48 +0000 (15:27 +0100)]
label: Simplify ensure_layout()
use an early return for an already existing layout.
Christoph Reiter [Sun, 4 Mar 2018 17:40:12 +0000 (18:40 +0100)]
gtkimcontextxim: fix gtk_im_context_xim_set_client_widget not handling widget=NULL
gtk_im_context_set_client_widget() allows passing NULL as widget to signal that
the widget no longer exists. The xim implementation didn't handle that
case which led to the test suite on gitlab-ci failing.
Christoph Reiter [Sun, 4 Mar 2018 10:10:20 +0000 (10:10 +0000)]
Merge branch 'gi-a11y' into 'master'
Include gtk/gtk-a11y.h in introspection file.
See merge request GNOME/gtk!43
Christoph Reiter [Sun, 4 Mar 2018 09:43:34 +0000 (09:43 +0000)]
Merge branch 'include-gtkstackaccessible' into 'master'
a11y: Include gtkstackaccessible.h in gtk-a11y.h
See merge request GNOME/gtk!41
Tomasz Miąsko [Sat, 3 Mar 2018 00:00:00 +0000 (00:00 +0000)]
Include gtk/gtk-a11y.h in introspection file.
The gir XML file contains description of types and functions from
gtk/gtk-a11y.h. Indicate that this header should be included in addition
to gtk/gtk.h in applications written in C. #56
Tomasz Miąsko [Sat, 3 Mar 2018 00:00:00 +0000 (00:00 +0000)]
a11y: Include gtkstackaccessible.h in gtk-a11y.h
Bruce Cowan [Fri, 2 Mar 2018 22:09:11 +0000 (22:09 +0000)]
Update British English translation
(cherry picked from commit
3059df0d4deb28875e3bd7c56c06f5c067264505)
Piotr Drąg [Fri, 2 Mar 2018 20:27:43 +0000 (21:27 +0100)]
Update POTFILES.skip
Piotr Drąg [Fri, 2 Mar 2018 20:26:21 +0000 (21:26 +0100)]
Update POTFILES.skip
Benjamin Otte [Sun, 25 Feb 2018 19:39:09 +0000 (20:39 +0100)]
gtk: Remove unused header files in gtk/ui/
Benjamin Otte [Mon, 26 Feb 2018 13:01:29 +0000 (14:01 +0100)]
entry: Remove cursor adjustment APIs
Benjamin Otte [Thu, 1 Mar 2018 00:08:05 +0000 (01:08 +0100)]
css: Parse hex colors with alpha value
The CSS color spec version 4 introduces this, support has hit Safari,
Chrome and Firefox, so this looks like a feature that's here to stay.
https://drafts.csswg.org/css-color/#hex-notation
Piotr Drąg [Thu, 1 Mar 2018 17:38:05 +0000 (18:38 +0100)]
Update POTFILES.in
Christoph Reiter [Thu, 1 Mar 2018 13:46:26 +0000 (13:46 +0000)]
Merge branch 'quartz-missing-config-include-gtk4' into 'master'
macos: Fix missing gdk symbol exports for gtk dnd
See merge request GNOME/gtk!39
Christoph Reiter [Thu, 1 Mar 2018 13:31:57 +0000 (14:31 +0100)]
macos: export gdk_quartz_drag_source_context()
It's used in the gtk dnd code but not exported in gdk.
Append a "_libgtk_only" suffix as with other internal exports and
export the symbol.
See #32
Emmanuele Bassi [Thu, 1 Mar 2018 10:09:22 +0000 (17:09 +0700)]
ci: Store the logs on build failure
We should save the logs directory when the CI pipeline fails, so that we
have a chance at debugging the failure.
Emmanuele Bassi [Thu, 1 Mar 2018 10:08:27 +0000 (17:08 +0700)]
ci: Update the configuration options
The options were renamed in commit
7b32900c5574.
Emmanuele Bassi [Thu, 1 Mar 2018 09:44:02 +0000 (16:44 +0700)]
xim: Use NULL-safe string comparison
The locale string may be NULL.
Matthias Clasen [Thu, 1 Mar 2018 06:38:39 +0000 (06:38 +0000)]
Merge branch 'wip/matthiasc/immodule-cleanup' into 'master'
Convert immodules to use an extension point
See merge request GNOME/gtk!34
Timm Bäder [Tue, 27 Feb 2018 14:13:14 +0000 (15:13 +0100)]
entry: Simplify cursor management
Since cursors are per-widget now and the icons are widgets, we can just
set the cursors once.
Christoph Reiter [Tue, 27 Feb 2018 18:53:43 +0000 (19:53 +0100)]
macos: Fix gdk_quartz_drag_context_get_dragging_info_libgtk_only symbol export
The header got included without config.h being included first which resulted in the
wrong _GDK_EXTERN macro being used. As a result some symbols weren't exported
and starting a DnD action would crash in the linker.
This patch adds config.h includes in all places where clang complained about
_GDK_EXTERN redefinitions.
See #32 for more info.
Patrick Griffis [Tue, 27 Feb 2018 18:42:28 +0000 (13:42 -0500)]
build: Error if no backends enabled
Timm Bäder [Tue, 27 Feb 2018 13:22:08 +0000 (14:22 +0100)]
gl: Make blur nodes with radius ∈ ]0; 1[
Otherwise, the radius here ends up being 0 and we don't draw anything at
all.
Timm Bäder [Tue, 27 Feb 2018 13:12:25 +0000 (14:12 +0100)]
gsk: Increase blur node bounds by blur radius
Otherwise, the resulting node will be too small and the result looks
clipped.
Timm Bäder [Tue, 27 Feb 2018 11:51:07 +0000 (12:51 +0100)]
tests: Add testblur
Timm Bäder [Tue, 27 Feb 2018 11:39:04 +0000 (12:39 +0100)]
scale: Remove priv pointer
Timm Bäder [Tue, 27 Feb 2018 10:45:34 +0000 (11:45 +0100)]
emojichooser: Only measure reference emoji once
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
Timm Bäder [Tue, 27 Feb 2018 10:05:04 +0000 (11:05 +0100)]
entry: Add motion controller
Do the mouse cursor un-obscuring in the ::motion handler instead of in
the ->event handler. We don't get rid of the GtkWidgetClass::event
handler altogether that way, but it's a step in the right direction.
Timm Bäder [Mon, 26 Feb 2018 19:23:45 +0000 (20:23 +0100)]
spinbutton: Fold function into only caller
Timm Bäder [Mon, 26 Feb 2018 18:59:59 +0000 (19:59 +0100)]
spinbutton: Remove unused macro
Timm Bäder [Mon, 26 Feb 2018 17:06:04 +0000 (18:06 +0100)]
checkbutton: Don't reorder non-existent indicator widget
Timm Bäder [Mon, 26 Feb 2018 11:14:10 +0000 (12:14 +0100)]
entry: Check gdk_event_get_coords return value
We use the x/y values later on to decide what to do with the event.
Timm Bäder [Mon, 26 Feb 2018 11:29:11 +0000 (12:29 +0100)]
entry: Allocate icons at full height
Makes for a larger hit area for pointing devices. If vertical centering
is still desired, GtkWidget:halign can be set on the icon widgets.
Timm Bäder [Mon, 26 Feb 2018 07:42:38 +0000 (08:42 +0100)]
widget: Simplify set_style_context
No need to use widget->priv later if we already define a priv pointer
before.
Timm Bäder [Sun, 25 Feb 2018 10:29:33 +0000 (11:29 +0100)]
button: Remove priv pointer
This way we can also move the GtkButtonPrivate definition into
gtkbutton.c
Timm Bäder [Sat, 24 Feb 2018 09:49:44 +0000 (10:49 +0100)]
filechooserwidget: Make the location entry hexpand
Timm Bäder [Sat, 24 Feb 2018 09:49:30 +0000 (10:49 +0100)]
textview: Use content size when validating contents
Timm Bäder [Sat, 24 Feb 2018 07:40:41 +0000 (08:40 +0100)]
contentsformat: Avoid a GPtrArray
We know how many items this array will have in advance, so just malloc
enough.
Timm Bäder [Sat, 24 Feb 2018 06:56:48 +0000 (07:56 +0100)]
widget: Remove some unneeded prototypes
Matthias Clasen [Sun, 25 Feb 2018 02:44:03 +0000 (21:44 -0500)]
fix the build
Matthias Clasen [Sat, 24 Feb 2018 06:01:30 +0000 (01:01 -0500)]
Update docs for changed options
Matthias Clasen [Sat, 24 Feb 2018 05:51:00 +0000 (00:51 -0500)]
Update docs for immodules
Matthias Clasen [Fri, 23 Feb 2018 19:59:49 +0000 (14:59 -0500)]
Always include platform immodules
No need to load these as gio modules, we just include
them in libgtk.
Matthias Clasen [Mon, 19 Feb 2018 23:29:00 +0000 (18:29 -0500)]
Convert immodules to use an extension point
Add an extension point called gtk-im-module, which requires
the type GtkIMContext. Simplify the loading by using GIO
infrastructure. Drop the locale filtering for now, I don't
think it is really necessary nowadays.
Convert existing platform modules to gio modules.
Sill to do: Drop the conditional build machinery.
Either always include them, or never.
Matthias Clasen [Sat, 24 Feb 2018 06:02:17 +0000 (01:02 -0500)]
Don't mention papi in options docs
The papi print backend has been removed.
Matthias Clasen [Sat, 24 Feb 2018 05:44:21 +0000 (00:44 -0500)]
Add some debug output to print backend loading
Matthias Clasen [Sat, 24 Feb 2018 23:06:51 +0000 (18:06 -0500)]
README.md: Minor updates
Timm Bäder [Fri, 23 Feb 2018 21:14:38 +0000 (22:14 +0100)]
widget: Don't export propagate_hierarchy_changed
Timm Bäder [Fri, 23 Feb 2018 21:08:45 +0000 (22:08 +0100)]
widget: Simplify _set_name
No need for a new_name local variable here.
Timm Bäder [Fri, 23 Feb 2018 15:18:11 +0000 (16:18 +0100)]
button: Remove ::event handler
GRAB_BROKEN events cause the ::cancel handler of the gesture to be
emitted, which is where we also call gtk_button_do_release, so this
GtkWidget::event handler is unnecessary.
Timm Bäder [Fri, 23 Feb 2018 10:34:18 +0000 (11:34 +0100)]
widget: Correct translate_coordinate documentation
We write 0 to dest_x and dest_y nowadays if the two widgets do not have
a common ancestor.
GNOME Translation Robot [Fri, 23 Feb 2018 17:34:56 +0000 (17:34 +0000)]
Update Scottish Gaelic translation
(cherry picked from commit
f3f75f62e8e419b2e8cc6fcd243f12ee7b281e7d)
GNOME Translation Robot [Fri, 23 Feb 2018 17:25:08 +0000 (17:25 +0000)]
Update Scottish Gaelic translation
(cherry picked from commit
68eb897900b6ca8b5173c9d21ea122db7694069c)
Timm Bäder [Fri, 23 Feb 2018 16:03:53 +0000 (16:03 +0000)]
Merge branch 'text-view-measure' into 'master'
text-view: make measure() use the layout height
See merge request GNOME/gtk!37
Benjamin Otte [Fri, 23 Feb 2018 12:49:17 +0000 (13:49 +0100)]
vulkan: Don't quiet the compiler
This reverts
76461a8004caf4490f84140b0551d1f5296241f6.
We don't want to quiet the compiler here because new warnings should be
added to the enum the moment they become available.
Benjamin Otte [Fri, 23 Feb 2018 12:48:20 +0000 (13:48 +0100)]
vulkan: Add error strings for missing VkResults
Also, guard newer error returns with proper #if, so they don't trip up
older Vulkan versions.
Timm Bäder [Fri, 23 Feb 2018 10:08:53 +0000 (11:08 +0100)]
placessidebar: Don't create a GtkWindow for drag icons
Just use the drag_widget we create before, since GtkWindow drag icons
are not allowed anymore.
Timm Bäder [Fri, 23 Feb 2018 09:59:21 +0000 (10:59 +0100)]
range: Fix typo in allocate_trough
lower - upper results in something negative of course.
Timm Bäder [Fri, 23 Feb 2018 09:27:35 +0000 (10:27 +0100)]
widget: Improve warning for negative size_allocate dimensions
Print widget class, css node name and address.
Timm Bäder [Fri, 23 Feb 2018 09:42:09 +0000 (10:42 +0100)]
range: Fix coord/value translation
Save the x/y we allocated the slider at, which is different than
the coordinates we get from any of the widget allocation accessors.
Timm Bäder [Fri, 23 Feb 2018 07:40:27 +0000 (08:40 +0100)]
range: Compute slider allocation in update_initial_slider_position
Instead of outside at every call-site.
Timm Bäder [Fri, 23 Feb 2018 06:59:10 +0000 (07:59 +0100)]
range: Remove GtkScale special casing
This is unnecessary these days due to the negative margins of the
slider.
Timm Bäder [Thu, 22 Feb 2018 17:24:06 +0000 (18:24 +0100)]
range: Simplify allocate_trough
Timm Bäder [Thu, 22 Feb 2018 16:56:49 +0000 (17:56 +0100)]
range: Simplify compute_slider_position
Timm Bäder [Thu, 22 Feb 2018 16:13:05 +0000 (17:13 +0100)]
range: Fix coordinates in coord_to_value
The given coordinate needs to be trough-relative, since that's what the
slider is relative to. Also use the trough's content size and not the
outer size.
Timm Bäder [Tue, 20 Feb 2018 10:20:12 +0000 (11:20 +0100)]
range: Remove some unneeded includes
Timm Bäder [Tue, 20 Feb 2018 09:43:15 +0000 (10:43 +0100)]
range: Remove priv pointer
Timm Bäder [Tue, 20 Feb 2018 09:31:20 +0000 (10:31 +0100)]
range: Stop tracking mouse position
We have the mouse position available everywhere we want to use it
anyway, so use that instead.
Timm Bäder [Tue, 20 Feb 2018 09:16:00 +0000 (10:16 +0100)]
range: Stop tracking mouse location
Instead, just use gtk_widget_pick() to get the widget at the pointer
position whenever we need it.
Timm Bäder [Sat, 17 Feb 2018 14:25:06 +0000 (15:25 +0100)]
range: Don't call calc_slider() on value changes
calc_slider() updates the slider visibility, but that can only change if
the upper or lower change.
Timm Bäder [Sat, 17 Feb 2018 08:48:57 +0000 (09:48 +0100)]
range: Remove unnecessary queue_draw calls
Timm Bäder [Sat, 17 Feb 2018 08:29:45 +0000 (09:29 +0100)]
range: Remove scale special case
This is done automatically nowadays since the value is shown in a
widget.
Peter Bloomfield [Wed, 21 Feb 2018 13:22:42 +0000 (08:22 -0500)]
text-view: make measure() use the layout height
GtkTextView::measure should include the height of the text-layout in its
minimum and natural heights. This fixes scrolling when a text-view has a
scrolled-window ancestor that is not its immediate parent.
Emmanuele Bassi [Wed, 21 Feb 2018 12:07:37 +0000 (12:07 +0000)]
Merge branch 'gitlab-ci-run-gtk-tests' into 'master'
gitlab-ci: run parts of the test suite
See merge request GNOME/gtk!22
Emmanuele Bassi [Tue, 20 Feb 2018 13:19:31 +0000 (13:19 +0000)]
build: Do not eagerly disable checks on release builds
Release builds should only disable cast checks, to match what we used
to do back with the Autotools builds.
The Autotools build had an "--enable-debug=no" option, but that was
rarely used; Meson has debug, debugoptimized, release, and plain build
types, but we considered the "release" build types as the old "disable
all debugging code", which is not really accurate.
Disabling assertions and preconditon checks should be left to people
with constrained environments and/or packagers; they are supposed to
use the "plain" build type, and override the CFLAGS themselves.
Emmanuele Bassi [Tue, 20 Feb 2018 13:18:28 +0000 (13:18 +0000)]
build: Use get_supported_arguments()
Instead of checking each flag one by one, use the appropriate method of
the Meson compiler object.
Matthias Clasen [Mon, 19 Feb 2018 23:32:50 +0000 (18:32 -0500)]
Drop no-longer existing im modules
This was just dead code. The actual modules have already
been removed.